<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: ChannelInfo::BaseIntersectionIterator&lt; C, ItMatrix, ItSubMatrix &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00024.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">ChannelInfo::BaseIntersectionIterator&lt; C, ItMatrix, ItSubMatrix &gt; Class Template Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="ChannelInfo::BaseIntersectionIterator" -->
<p>Iterator for every intersection of a specific interval in a AirFrameMatrix.  
 <a href="a00024.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00287_source.html">ChannelInfo.h</a>&gt;</code></p>

<p><a href="a00633.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a471fc1a60af635fb3c0a8ab8d6cce8bc"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::value_type" ref="a471fc1a60af635fb3c0a8ab8d6cce8bc" args="" -->
typedef ItSubMatrix::value_type&#160;</td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac7f5f7659e2af1cd8716a834401efd2"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::reference" ref="aac7f5f7659e2af1cd8716a834401efd2" args="" -->
typedef ItSubMatrix::reference&#160;</td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93097271e65622f4c9f6deb25dafcd7a"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::pointer" ref="a93097271e65622f4c9f6deb25dafcd7a" args="" -->
typedef ItSubMatrix::pointer&#160;</td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afde30f590f3ae0d5bd3826b117f0f8cd"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::iterator" ref="afde30f590f3ae0d5bd3826b117f0f8cd" args="" -->
typedef <br class="typebreak"/>
<a class="el" href="a00024.html">BaseIntersectionIterator</a>&lt; C, <br class="typebreak"/>
ItMatrix, ItSubMatrix &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad49480648b20cce752a10c1704ffaffc"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::iterator_category" ref="ad49480648b20cce752a10c1704ffaffc" args="" -->
typedef <br class="typebreak"/>
std::bidirectional_iterator_tag&#160;</td><td class="memItemRight" valign="bottom"><b>iterator_category</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f20f8603ee051ed974807524a421236"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::difference_type" ref="a5f20f8603ee051ed974807524a421236" args="" -->
typedef ptrdiff_t&#160;</td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6395e3ba8586e3de880388e5d5d58f21"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::BaseIntersectionIterator" ref="a6395e3ba8586e3de880388e5d5d58f21" args="(C *airFrames, simtime_t_cref from, simtime_t_cref to)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a6395e3ba8586e3de880388e5d5d58f21">BaseIntersectionIterator</a> (C *airFrames, simtime_t_cref <a class="el" href="a00024.html#ae2985262dd881a9c3598ca5e780b3a46">from</a>, simtime_t_cref <a class="el" href="a00024.html#a0cafe335b6679b27f704565c57432047">to</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an iterator for the specified interval at the specified AirFrameMatrix. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3f4ba383c358727a9081102fd501474"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::BaseIntersectionIterator" ref="ad3f4ba383c358727a9081102fd501474" args="(const iterator &amp;__it)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>BaseIntersectionIterator</b> (const <a class="el" href="a00024.html">iterator</a> &amp;__it)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae590cfe5db2f81bf58735f210e826e08"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator*" ref="ae590cfe5db2f81bf58735f210e826e08" args="() const " -->
reference&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3a18191044b24791c8a56158acc9acd"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator&#45;&gt;" ref="ab3a18191044b24791c8a56158acc9acd" args="() const " -->
pointer&#160;</td><td class="memItemRight" valign="bottom"><b>operator-&gt;</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45eb6b8c190d1fe0126ba0ff633b7be0"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator++" ref="a45eb6b8c190d1fe0126ba0ff633b7be0" args="()" -->
<a class="el" href="a00024.html">_Self</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a45eb6b8c190d1fe0126ba0ff633b7be0">operator++</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Increases the iterator to the next intersecting AirFrame. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a980d6201ccb18916142ca01c30c16152"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator++" ref="a980d6201ccb18916142ca01c30c16152" args="(int)" -->
<a class="el" href="a00024.html">_Self</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a980d6201ccb18916142ca01c30c16152">operator++</a> (int)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Increases the iterator to the next intersecting AirFrame. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38ab956a1689568c8b0ba646ab479421"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator==" ref="a38ab956a1689568c8b0ba646ab479421" args="(const _Self &amp;__x) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a38ab956a1689568c8b0ba646ab479421">operator==</a> (const <a class="el" href="a00024.html">_Self</a> &amp;__x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two iterators for equality. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad924b017640e7eaf589c78bcff4ee730"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::operator!=" ref="ad924b017640e7eaf589c78bcff4ee730" args="(const _Self &amp;__x) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#ad924b017640e7eaf589c78bcff4ee730">operator!=</a> (const <a class="el" href="a00024.html">_Self</a> &amp;__x) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two iterators for inequality. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9638ff6acb30ac74903e35f3c20ae55d"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::_Self" ref="a9638ff6acb30ac74903e35f3c20ae55d" args="" -->
typedef <br class="typebreak"/>
<a class="el" href="a00024.html">BaseIntersectionIterator</a>&lt; C, <br class="typebreak"/>
ItMatrix, ItSubMatrix &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>_Self</b></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00024.html">_Self</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a793a9ebbc78c634d3e74fe50aaf0b04e">jumpToNextValid</a> (ItMatrix endItEnd)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a752c33584da635c8293c29c2116cdc42"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::intervals" ref="a752c33584da635c8293c29c2116cdc42" args="" -->
C *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a752c33584da635c8293c29c2116cdc42">intervals</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the matrix holding the intervals. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2985262dd881a9c3598ca5e780b3a46"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::from" ref="ae2985262dd881a9c3598ca5e780b3a46" args="" -->
simtime_t_cref&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#ae2985262dd881a9c3598ca5e780b3a46">from</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Point in time to start iterating over intersections. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0cafe335b6679b27f704565c57432047"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::to" ref="a0cafe335b6679b27f704565c57432047" args="" -->
simtime_t_cref&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a0cafe335b6679b27f704565c57432047">to</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Point in time to end iterating over intersections. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0546c8bfc867fbe321668ac876328d6d"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::endIt" ref="a0546c8bfc867fbe321668ac876328d6d" args="" -->
ItMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#a0546c8bfc867fbe321668ac876328d6d">endIt</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator over AirFrame end times. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab0d649bb86964e452843cfc9a78f09b5"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::startIt" ref="ab0d649bb86964e452843cfc9a78f09b5" args="" -->
ItSubMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html#ab0d649bb86964e452843cfc9a78f09b5">startIt</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator over AirFrame start times. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac4b600f26b96210e2b41eccc8d9ad893"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::startItEnd" ref="ac4b600f26b96210e2b41eccc8d9ad893" args="" -->
ItSubMatrix&#160;</td><td class="memItemRight" valign="bottom"><b>startItEnd</b></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aefc7c05227de417f9908d7c8735c394e"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::ChannelInfo" ref="aefc7c05227de417f9908d7c8735c394e" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>ChannelInfo</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename C, typename ItMatrix = typename C::const_iterator, typename ItSubMatrix = typename C::mapped_type::const_iterator&gt;<br/>
class ChannelInfo::BaseIntersectionIterator&lt; C, ItMatrix, ItSubMatrix &gt;</h3>

<p>Iterator for every intersection of a specific interval in a AirFrameMatrix. </p>
<p>A time interval A_start to A_end intersects with another interval B_start to B_end iff the following two conditions are fulfilled:</p>
<p>1. A_end &gt;= B_start. 2. A_start &lt;= B_end and</p>
<p>Or the defined by the opposite: The two intervals do not intersect iff A_end &lt; B_start or A_start &gt; B_end.</p>
<p>To iterate over a two dimensional (end-time x start-time) container of AirFrames this class iterates over all AirFrame-lists whose end-time is bigger or equal than the interval start (intersect condition 1) and in each of these lists iterates over all entries but only stops at and returns entries which start-time is smaller or equal than the interval end (intersection condition 2).</p>
<p>In template form to work as const- and non-const iterator. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a793a9ebbc78c634d3e74fe50aaf0b04e"></a><!-- doxytag: member="ChannelInfo::BaseIntersectionIterator::jumpToNextValid" ref="a793a9ebbc78c634d3e74fe50aaf0b04e" args="(ItMatrix endItEnd)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C , typename ItMatrix  = typename C::const_iterator, typename ItSubMatrix  = typename C::mapped_type::const_iterator&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00024.html">_Self</a>&amp; <a class="el" href="a00024.html">ChannelInfo::BaseIntersectionIterator</a>&lt; C, ItMatrix, ItSubMatrix &gt;::jumpToNextValid </td>
          <td>(</td>
          <td class="paramtype">ItMatrix&#160;</td>
          <td class="paramname"><em>endItEnd</em></td><td>)</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Jumps top next valid entry.</p>
<p>ATTENTION: startIt and startItEnd must be set! </p>
<div class="fragment"><pre class="fragment">      {
      <span class="keywordflow">for</span> (; <a class="code" href="a00024.html#a0546c8bfc867fbe321668ac876328d6d" title="Iterator over AirFrame end times.">endIt</a> != endItEnd; <a class="code" href="a00024.html#ab0d649bb86964e452843cfc9a78f09b5" title="Iterator over AirFrame start times.">startIt</a> = <a class="code" href="a00024.html#a0546c8bfc867fbe321668ac876328d6d" title="Iterator over AirFrame end times.">endIt</a>-&gt;second.begin()) {
        <span class="comment">// while there are entries left at the current end-time</span>
        <span class="keywordflow">if</span> (<a class="code" href="a00024.html#ab0d649bb86964e452843cfc9a78f09b5" title="Iterator over AirFrame start times.">startIt</a> != startItEnd) {
          <span class="comment">// check if this entry fulfills the intersection condition</span>
          <span class="comment">// 2 (condition 1 is already fulfilled in the constructor by</span>
          <span class="comment">// the start-value of the end-time-iterator)</span>
          <span class="keywordflow">return</span> *<span class="keyword">this</span>;
        }
        <span class="keywordflow">if</span> (++<a class="code" href="a00024.html#a0546c8bfc867fbe321668ac876328d6d" title="Iterator over AirFrame end times.">endIt</a> != endItEnd) {
          startItEnd = <a class="code" href="a00024.html#a0546c8bfc867fbe321668ac876328d6d" title="Iterator over AirFrame end times.">endIt</a>-&gt;second.upper_bound(<a class="code" href="a00024.html#a0cafe335b6679b27f704565c57432047" title="Point in time to end iterating over intersections.">to</a>);
        }
      }

      <a class="code" href="a00024.html#a752c33584da635c8293c29c2116cdc42" title="Pointer to the matrix holding the intervals.">intervals</a> = NULL;
      <span class="keywordflow">return</span> *<span class="keyword">this</span>;
      }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00287_source.html">ChannelInfo.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00043.html">ChannelInfo</a>      </li>
      <li class="navelem"><a class="el" href="a00024.html">BaseIntersectionIterator</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:31 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
